﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;

namespace ProjectNocturnalFool
{
    public enum CharacterClass
    {
        [Description("Warrior")]Warrior,
        [Description("Mage")]Mage
    }

    public enum Gender
    {
        [Description("Male")]
        Male,
        [Description("Female")]
        Female
    }

    public static class EnumExtensions
    {
        public static string Description(this Enum value)
        {
            var enumType = value.GetType();
            var field = enumType.GetField(value.ToString());
            var attributes = field.GetCustomAttributes(typeof(DescriptionAttribute),
                                                       false);
            return attributes.Length == 0
                ? value.ToString()
                : ((DescriptionAttribute)attributes[0]).Description;
        }
    }



    public enum CharacterRace
    {
        [Description("Dust Men")]DustMan,
        [Description("Pharo Men")]PharoMan
    }

    class Character
    {
        #region Fields
        public string name;

        public CharacterClass charClass;

        public CharacterRace charRace;

        public int health;

        public int mana;

        public Gender gender;

        #endregion

        #region Constructor

        public Character()
        {
            name = "Default";
            charClass = CharacterClass.Warrior;
            charRace = CharacterRace.DustMan;
            health = 10;
            mana = 10;
            gender = Gender.Male;
        }

        #endregion

    }
}
